import { getListInfo, getPage } from "./type";
import service from "@/utils/request";
import { AxiosPromise } from "axios";
const { resourceService } = service;

/**
 * 管理员获取所有
 *
 */
export function getComment(data?: getPage): AxiosPromise<any> {
  return resourceService({
    url: "/resource/comment/getAll",
    method: "get",
    params: data,
  });
}

/**
 *
 * @param id 管理员删除评论
 * @returns
 */
export function deleteComment(id: number): AxiosPromise<any> {
  return resourceService({
    url: "/resource/comment/deleteComment/" + id,
    method: "delete",
  });
}
